<!DOCTYPE html>
<html lang="">
<head>
    <meta charset="UTF-8">
    <title>jquery+html5烂漫爱心动画</title>

<style type="text/css">
@font-face {
	font-family: digit;
	src: url('digital-7_mono.ttf') format("truetype");
}
</style>
<link href="./css/default.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="./js/jquery.js"></script>
<script type="text/javascript" src="./js/garden.js"></script>
<script type="text/javascript" src="./js/functions.js"></script>

</head>

<body>

<div id="mainDiv">
	<div id="content">
		<div id="code">
			<span class="comments">/**</span><br />
			<span class="comments">* @Author L</span><br />
			<span class="comments">* @create 2024—07-25 12:00:00</span><br />
			<span class="comments">* @Description 烂漫爱心动画</span><br />
			<span class="comments">*/</span><br />
			<br /><br />
			<span class="comments">// Live a life that goes with the flow and be who you are</span><br />
			过顺其自然的生活，做随遇而安的自己<br />
		</div>
		<div id="loveHeart" style="margin-top: 20px;">
			<canvas id="garden"></canvas>
			<div id="words">
				<div id="messages">
					发布时间间隔
					<div id="elapseClock"></div>
				</div>
				<div id="loveu">
					发布人<br/>
					<div class="signature">- L</div>
				</div>
			</div>
		</div>
	</div>
</div>

<script type="text/javascript">
var offsetX = $("#loveHeart").width() / 2;
var offsetY = $("#loveHeart").height() / 2 - 55;
var together = new Date();
together.setFullYear(2024, 6, 25);
together.setHours(12);
together.setMinutes(0);
together.setSeconds(0);
together.setMilliseconds(0);

if (!document.createElement('canvas').getContext) {
	var msg = document.createElement("div");
	msg.id = "errorMsg";
	msg.innerHTML = "Your browser doesn't support HTML5!<br/>Recommend use Chrome 14+/IE 9+/Firefox 7+/Safari 4+"; 
	document.body.appendChild(msg);
	document.execCommand("stop");
} else {
	setTimeout(function () {
		startHeartAnimation();
	}, 2000);

	timeElapse(together);
	setInterval(function () {
		timeElapse(together);
	}, 500);

	$("#code").typewriter();
}
</script>
</body>
</html>